package com.mapbased.cc.form;

import java.io.IOException;
import com.mapbased.wfw.RenderContext;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: mapbased.com</p>
 *
 * @author Chang Huanyou (Baily)
 * @version 1.0
 */
public class PasswordFormElement
    extends FormElement
{

    final public void renderInputPart(RenderContext rc)
        throws IOException
    {
        java.io.Writer w=rc.getOutputWriter();
        w.write("<input class=\"");
        w.write(this.css == null ? this.getType() : this.css);

        w.write("\" type=\"");
        w.write(this.getType());

        if(this.style != null)
        {
            w.write("\" style=\"");
            w.write(this.style);

        }

        w.write("\" id=\"");

        w.write(this.name);

        w.write("\" name=\"");

        w.write(this.name);
        w.write("\" />");

    }

    final protected String getType()
    {
        return "password";
    }

}
